import Vue from 'vue'
import App from './App.vue'
// 完整引入，main.js写入以下代码
// import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
import router from '@/router'
import instance from './utils/http'
import GeekChannel from './components/geek-channel.vue'
// element-ui 按需导入(打包体积更小)
import './components/EElement-ui'
Vue.config.productionTip = false
// 把ElementUI注册为全局组件
// Vue.use(ElementUI)

// 通过 Vue.component 全局注册组件
Vue.component(GeekChannel.name, GeekChannel)
Vue.prototype.$http = instance
new Vue({
  render: h => h(App),
  router // 把router挂载到Vue实例上
}).$mount('#app')
